{// 引入标签库 }
<tagLib name="html" />
<include file="Public:header" />
<script type="text/javascript" src="__ROOT__/system/region.js"></script>	
<load href='__TMPL__Common/js/deal_edit.js' />
<script type="text/javascript" src="__TMPL__Common/js/calendar/calendar.php?lang=zh-cn" ></script>
<load href='__TMPL__Common/js/calendar/calendar.css' />
<load href='__TMPL__Common/js/calendar/calendar.js' />
<div class="main">
<div class="main_title">{%EDIT} <a href="{:u("Deal/online_index")}" class="back_list">{%BACK_LIST}</a></div>
<div class="blank5"></div>
<form name="edit" action="__APP__" method="post" enctype="multipart/form-data">
<table class="form conf_tab" cellpadding=0 cellspacing=0 >
	<tr>
		<td colspan=2 class="topTd"></td>
	</tr>
	<tr>
		<td class="item_title">名称:</td>
		<td class="item_input"><input type="text" class="textbox require" value="{$vo.name}" name="name" /></td>
	</tr>
	<tr>
		<td class="item_title">发起人ID:</td>
		<td class="item_input"><input type="text" class="textbox" name="user_id" value="{$vo.user_id}" style="width:30px;" /> <span class='tip_span'>不填写表示管理员发起</span></td>
	</tr>
	<tr>
		<td class="item_title">图片:</td>
		<td class="item_input">
			<html:imgUpload name = 'image' id='image' value='$vo.image' />
		</td>
	</tr>
	<tr>
		<td class="item_title">视频地址:</td>
		<td class="item_input"><input type="text" class="textbox" name="vedio" value="{$vo.vedio}" /></td>
	</tr>
	<tr>
		<td class="item_title">参考上线天数:</td>
		<td class="item_input"><input type="text" class="textbox" name="deal_days" value="{$vo.deal_days}" /></td>
	</tr>
	<tr>
		<td class="item_title">开始时间:</td>
		<td class="item_input">
			<input type="text" class="textbox require" name="begin_time" id="begin_time" value="{$vo.begin_time}" onfocus="this.blur(); return showCalendar('begin_time', '%Y-%m-%d %H:%M:%S', false, false, 'btn_begin_time');" />
			<input type="button" class="button" id="btn_begin_time" value="{%SELECT_TIME}" onclick="return showCalendar('begin_time', '%Y-%m-%d %H:%M:%S', false, false, 'btn_begin_time');" />	
			<input type="button" class="button" value="{%CLEAR_TIME}" onclick="$('#begin_time').val('');" />	

		</td>
	</tr>
	<tr>
		<td class="item_title">结束时间:</td>
		<td class="item_input">
			<input type="text" class="textbox require" name="end_time" id="end_time" value="{$vo.end_time}" onfocus="this.blur(); return showCalendar('end_time', '%Y-%m-%d %H:%M:%S', false, false, 'btn_end_time');" />
			<input type="button" class="button" id="btn_end_time" value="{%SELECT_TIME}" onclick="return showCalendar('end_time', '%Y-%m-%d %H:%M:%S', false, false, 'btn_end_time');" />	
			<input type="button" class="button" value="{%CLEAR_TIME}" onclick="$('#end_time').val('');" />

		</td>
	</tr>
	
	<tr>
		<td class="item_title">上架:</td>
		<td class="item_input">
			<lable>{%IS_EFFECT_1}<input type="radio" name="is_effect" value="1" <if condition="$vo['is_effect'] eq 1">checked="checked"</if> /></lable>
			<lable>{%IS_EFFECT_0}<input type="radio" name="is_effect" value="0" <if condition="$vo['is_effect'] eq 0">checked="checked"</if> /></lable>
		</td>
	</tr>
	
	<tr>
		<td class="item_title">目标金额:</td>
		<td class="item_input"><input type="text" class="textbox" name="limit_price"  value="{$vo.limit_price}"/></td>
	</tr>
	
	<tr>
		<td class="item_title">简介:</td>
		<td class="item_input">
			<textarea name="brief" class="textarea">{$vo.brief}</textarea>
		</td>
	</tr>
	
	<tr>
		<td class="item_title">详情:</td>
		<td class="item_input">
			 <html:editor id="description" name="description" type="KINDEDITOR" content="{$vo.description}" />
		</td>
	</tr>
	
	<tr>
		<td class="item_title">标签:</td>
		<td class="item_input"><input type="text" class="textbox" name="tags" style="width:500px;" value="{$vo.tags}" /> <span class='tip_span'>用空格分隔</span></td>
	</tr>
	
	<tr>
		<td class="item_title">分类:</td>
		<td class="item_input">
			<select name="cate_id" class="require">
				<option value="0">请选择</option>
				<foreach name="cate_list" item="cate_item">
					<option value="{$cate_item.id}" <if condition="$vo['cate_id'] eq $cate_item['id']">selected="selected"</if> >{$cate_item.name}</option>
				</foreach>
			</select>
		</td>
	</tr>
	
	<tr>
		<td class="item_title">所属地区:</td>
		<td class="item_input">
			<select name="province">				
			<option value="" rel="0">请选择省份</option>
			<foreach name="region_lv2" item="region">
				<option value="{$region.name}" rel="{$region.id}" <if condition="$region['selected']">selected="selected"</if>>{$region.name}</option>
			</foreach>
			</select>
			
			<select name="city">				
			<option value="" rel="0">请选择城市</option>
			<foreach name="region_lv3" item="region">
				<option value="{$region.name}" rel="{$region.id}" <if condition="$region['selected']">selected="selected"</if>>{$region.name}</option>
			</foreach>
			</select>
		</td>
	</tr>
	
	<tr>
		<td class="item_title">排序:</td>
		<td class="item_input"><input type="text" class="textbox" name="sort" value="{$vo.sort}" /></td>
	</tr>
	
	<tr>
		<td class="item_title">常见问题: [<a href="javascript:void(0);" onclick="add_faq();">增加</a>]</td>
		<td class="item_input" id="faq">
			<foreach name="faq_list" item="faq_item">
				<div style="padding:3px;">
				问题 <input type="text" class="textbox" name="question[]" value="{$faq_item.question}" />
				答案 <input type="text" class="textbox" name="answer[]" value="{$faq_item.answer}" />
				<a href="javascript:void(0);" onclick="del_faq(this);">删除</a>
				</div>

			</foreach>
		</td>
	</tr>
	
	<tr>
		<td class="item_title">SEO标题:</td>
		<td class="item_input">
			<textarea name="seo_title" class="textarea">{$vo.seo_title}</textarea>
		</td>
	</tr>
	
	<tr>
		<td class="item_title">SEO关键词:</td>
		<td class="item_input">
			<textarea name="seo_keyword" class="textarea">{$vo.seo_keyword}</textarea>
		</td>
	</tr>
	
	<tr>
		<td class="item_title">SEO描述:</td>
		<td class="item_input">
			<textarea name="seo_description" class="textarea">{$vo.seo_description}</textarea>
		</td>
	</tr>
	
	<tr>
		<td colspan=2 class="bottomTd"></td>
	</tr>
</table>

<div class="blank5"></div>
	<table class="form" cellpadding=0 cellspacing=0>
		<tr>
			<td colspan=2 class="topTd"></td>
		</tr>
		<tr>
			<td class="item_title"></td>
			<td class="item_input">
			<!--隐藏元素-->
			<input type="hidden" name="{:conf("VAR_MODULE")}" value="Deal" />
			<input type="hidden" name="{:conf("VAR_ACTION")}" value="update" />
			<input type="hidden" name="id" value="{$vo.id}" />
			<!--隐藏元素-->
			<input type="submit" class="button" value="{%EDIT}" />
			<input type="reset" class="button" value="{%RESET}" />
			</td>
		</tr>
		<tr>
			<td colspan=2 class="bottomTd"></td>
		</tr>
	</table> 		 
</form>
</div>
<include file="Public:footer" />